package com.example.springbootplm.pojo;

public class Result {
    private Integer code;
    private String msg;
    private Object date;

    public Result(){}
    public Result(Integer code, String msg, Object date) {
        this.code = code;
        this.msg = msg;
        this.date = date;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getDate() {
        return date;
    }

    public void setDate(Object date) {
        this.date = date;
    }

    public static Result success(Object date){
        return new Result(1,"success",date);
    }

    public static Result success(){
        return new Result(1,"success",null);
    }

    public static Result error(String msg){
        return new Result(0,msg,null);
    }


}
